package edu.byu.intex2.data.bo;

import edu.byu.intex2.data.DataException;
import edu.byu.intex2.data.dao.*;

/**
 * @author Jason Whiting
 */
public class ConceptualCar extends BusinessObject
{

    private String make;
    private String model;
    private int year;
    private double basePrice;

    /**
     * Creates a new instance of BusinessObject
     * @param id
     */
    public ConceptualCar(String id)
    {
        super(id);
    }//constructor

    //Quick Access Method
    public void save() throws DataException
    {
        try
        {
            ConceptualCarDAO.getInstance().save(this);
        } catch (DataException e)
        {
            e.printStackTrace();
        }
    }

    /**
     * @return the make
     */
    public String getMake()
    {
        return make;
    }

    /**
     * @param make the make to set
     */
    public void setMake(String make)
    {
        this.make = make;
        this.setDirty();
    }

    /**
     * @return the model
     */
    public String getModel()
    {
        return model;
    }

    /**
     * @param model the model to set
     */
    public void setModel(String model)
    {
        this.model = model;
        this.setDirty();
    }

    /**
     * @return the year
     */
    public int getYear()
    {
        return year;
    }

    /**
     * @param year the year to set
     */
    public void setYear(int year)
    {
        this.year = year;
        this.setDirty();
    }

    /**
     * @return the basePrice
     */
    public double getBasePrice()
    {
        return basePrice;
    }

    /**
     * @param basePrice the basePrice to set
     */
    public void setBasePrice(double basePrice)
    {
        this.basePrice = basePrice;
        this.setDirty();
    }
}
